package educrypt.ciphers.playfair;

class TablePosition {
	private int row;
	private int column;

	public TablePosition() {
		this.row = -1;
		this.column = -1;
	}

	public TablePosition(int row, int column) {
		this.row = row;
		this.column = column;
	}

	public void setPosition(int row, int column) {
		this.row = row;
		this.column = column;
	}

	public int getRow() {
		return row;
	}

	public void setRow(int row) {
		this.row = row;
	}

	public int getColumn() {
		return column;
	}

	public void setColumn(int column) {
		this.column = column;
	}

	@Override
	public boolean equals(Object object) {
		return object instanceof TablePosition
				&& ((TablePosition) object).getRow() == this.getRow()
				&& ((TablePosition) object).getColumn() == this.getColumn();
	}

}
